package com.mcxx.modules.system.service.read;

import com.mcxx.modules.base.utils.QueryParamUtil;
import com.mcxx.modules.miniSalvation.family.dto.OrganizationDTO;
import com.mcxx.modules.miniSalvation.family.param.OrganizationParam;
import com.mcxx.modules.system.dao.read.IssuingBankReadDao;
import com.mcxx.modules.system.dto.IssuingBankDTO;
import com.mcxx.modules.system.param.IssuingBankParam;
import com.yinhai.ta404.core.restservice.requestbean.PageParam;
import com.yinhai.ta404.core.restservice.resultbean.Page;
import com.yinhai.ta404.core.security.vo.UserAccountVo;
import com.yinhai.ta404.core.service.BaseService;
import com.yinhai.ta404.core.transaction.annotation.TaTransactional;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@TaTransactional
public class IssuingBankReadService extends BaseService {
    @Autowired
    private IssuingBankReadDao issuingBankReadDao;


    public Page queryIssuingBankList(IssuingBankParam param, PageParam pageParam, UserAccountVo userAccount){
        QueryParamUtil.setBaseParamValue(param,userAccount);
        issuingBankReadDao.beginPager(pageParam);
        List<IssuingBankDTO> list = issuingBankReadDao.queryIssuingBankList(param);
        return issuingBankReadDao.endPager(list);
    }


    public List<IssuingBankDTO> exportIssuingBankList(IssuingBankParam param){return issuingBankReadDao.queryIssuingBankList(param);}


    public int getNumByRescueAreaCode(String rescueAreaCode){
        return issuingBankReadDao.getNumByRescueAreaCode(rescueAreaCode);
    }

}
